import request from "@/utils/request";
/**巡检对象告警 */
//根据巡检对象条件筛选出巡检对象树
export function API_pointTree(data) {
  return request({
    url: "/device.tree/point.tree.get",
    method: "post",
    data: data,
  });
}
//对象参数、标定信息查询
export function API_deviceInfo(treeId) {
  return request({
    url: "/alarmRule/device.info.get/" + treeId,
    method: "get",
  });
}
//告警规则查询
export function API_alarmRuleInfo(treeId) {
  return request({
    url: "/alarmRule/info.get/" + treeId,
    method: "get",
  });
}
//告警规则新增
export function API_alarmRuleAdd(data) {
  return request({
    url: "/alarmRule/add",
    method: "post",
    data: data,
  });
}
//告警规则编辑
export function API_alarmRuleEdit(data) {
  return request({
    url: "/alarmRule/edit",
    method: "post",
    data: data,
  });
}

//环境告警列表查询
export function API_getenvirList() {
  return request({
    url: "/alarmRuleEnvir/envirList",
    method: "get",
  });
}
//综合告警列表查询
export function API_comprehensiveList() {
  return request({
    url: "/alarmRuleEnvir/comprehensiveList",
    method: "get",
  });
}
//系统告警列表查询
export function API_getsysList() {
  return request({
    url: "/alarmRuleEnvir/sysList",
    method: "get",
  });
}

//环境、系统告警修改规则
export function API_editRuleEnvir(data) {
  return request({
    url: "/alarmRuleEnvir/edit",
    method: "post",
    data: data,
  });
}
//综合告警修改规则
export function API_editContent(data) {
  return request({
    url: "/alarmRuleEnvir/edit.content",
    method: "post",
    data: data,
  });
}
//对象参数、标定信息查询
export function API_calibDeviceInfo(treeId) {
  return request({
    url: "/alarmRule/device.info.get/" + treeId,
    method: "get",
  });
}
//判断批量选择的巡检对象是否是同一个数据类型
export function API_isSameDataType(data) {
  return request({
    url: "/alarmRule/isSameDataType",
    method: "post",
    data: data,
  });
}
//批量新增规则
export function API_saveBatch(data) {
  return request({
    url: "/alarmRule/saveBatch",
    method: "post",
    data: data,
  });
}
//系统告警单个查询
export function API_getByAlarmKey() {
  return request({
    url: "/alarmRuleEnvir/getByAlarmKey/electric_quantity",
    method: "get",
  });
}
